<?php
namespace view;

	class UserInfo {
		/**
		 * @var $cookieUserName string
		 * @var $cookiePassword string
		 * @var $sessionLoggedIn string
		 * @var $serverRequestMeth string
		 * @var $postRememberBox string
		 * @var $postUName string
		 * @var $postPWord string
		 * @var $arrayusername string
		 * @var $arraypassword string
		 */
		private static $cookieUserName = "UserName";
		private static $cookiePassword = "Password";
		private static $sessionLoggedIn = "loggedin";
		private static $serverRequestMeth = "REQUEST_METHOD";
		private static $postRememberBox = "rememberBox";
		private static $postUName = "uName";
		private static $postPWord = "pWord";
		private static $arrayusername = "username";
		private static $arraypassword = "password"; 

		public function cookieIsset() {
			return isset($_COOKIE[self::$cookieUserName]);
		}

		public function sessionSet() {
			return isset($_SESSION[self::$sessionLoggedIn]);
		}

		public function serverRequestMethod() {
			return $_SERVER[self::$serverRequestMeth];
		}

		public function getCookieInfo() {
			return [
				self::$arrayusername => $_COOKIE[self::$cookieUserName],
				self::$arraypassword => $_COOKIE[self::$cookiePassword]
			];
		}

		public function getRememberData() {
			return isset($_POST[self::$postRememberBox]);
		}

		public function getUserInfo() {
			return [
				"username" => $_POST[self::$postUName],
				"password" => $_POST[self::$postPWord]
			];
		}
	}
?>